package com.easy.common.bean;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.sql.Date;
import java.time.LocalDateTime;

@Data
@AllArgsConstructor//创建有参构造器
@NoArgsConstructor//创建无参构造器
@TableName("`order`")
public class OrderBean implements java.io.Serializable{
    //订单
    @TableId(type = IdType.AUTO)//主键自增
    private Integer id;
    private Integer userid;
    private Integer seatid;
    private String orderno;
    private Integer status;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createtime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime paytime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime expiretime;
    @TableLogic  // 标记为逻辑删除字段
    @TableField(value = "isdel")  // 映射数据库表中的isdel列
    private Integer isdel;
    private Integer concertid;
    private Integer seatpriceid;

    @TableField(exist = false) // 标识该字段不是数据库表字段
    private String userNickname; // 用户真实姓名

    @TableField(exist = false)// 非数据库字段
    private String seatArea;

    // 新增字段，用于前端显示
    @TableField(exist = false)
    private String concertTitle;
    @TableField(exist = false)
    private String artist;
    @TableField(exist = false)
    private LocalDateTime startdate;
    @TableField(exist = false)
    private Integer venueid;
    @TableField(exist = false)
    private String venueName; // 场馆名称

    @TableField(exist = false)
    private String photo; // 演唱会图片

    @TableField(exist = false)
    private BigDecimal seatprice;

}
